{"ast":null,"code":"var _jsxFileName = \"/data/messenger.client/src/containers/Messages.tsx\",\n  _s = $RefreshSig$();\nimport React from \"react\";\nimport { observer } from \"mobx-react-lite\";\nimport { Context } from \"../index\";\nimport { Messages as MessagesList } from \"../components/\";\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\nconst Messages = () => {\n  _s();\n  const {\n    store\n  } = React.useContext(Context);\n  const messagesRef = React.useRef(null);\n  React.useEffect(() => {\n    console.log(messagesRef.current);\n  }, [store.currentDialog.messages]);\n  if (store.getCurrentDialog().messages && store.getViewedDialogId() !== null) {\n    return /*#__PURE__*/_jsxDEV(MessagesList, {\n      ref: messagesRef,\n      messages: store.getCurrentDialog().messages\n    }, void 0, false, {\n      fileName: _jsxFileName,\n      lineNumber: 15,\n      columnNumber: 17\n    }, this);\n  } else {\n    return /*#__PURE__*/_jsxDEV(MessagesList, {}, void 0, false, {\n      fileName: _jsxFileName,\n      lineNumber: 17,\n      columnNumber: 17\n    }, this);\n  }\n};\n_s(Messages, \"vG3+x6NjKGhotmqlphTTGDDUha0=\");\n_c = Messages;\nexport default _c2 = observer(Messages);\nvar _c, _c2;\n$RefreshReg$(_c, \"Messages\");\n$RefreshReg$(_c2, \"%default%\");","map":{"version":3,"names":["React","observer","Context","Messages","MessagesList","store","useContext","messagesRef","useRef","useEffect","console","log","current","currentDialog","messages","getCurrentDialog","getViewedDialogId"],"sources":["/data/messenger.client/src/containers/Messages.tsx"],"sourcesContent":["import React from \"react\";\nimport {observer} from \"mobx-react-lite\";\nimport {Context} from \"../index\";\nimport {Messages as MessagesList} from \"../components/\";\n\nconst Messages:React.FC = () => {\n    const {store} = React.useContext(Context);\n    const messagesRef = React.useRef(null);\n\n    React.useEffect(() => {\n        console.log(messagesRef.current)\n    }, [store.currentDialog.messages]);\n\n    if (store.getCurrentDialog().messages && store.getViewedDialogId() !== null) {\n        return (<MessagesList ref={messagesRef} messages={store.getCurrentDialog().messages} />);\n    } else {\n        return (<MessagesList />);\n    }\n};\n\nexport default observer(Messages);"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAQC,QAAQ,QAAO,iBAAiB;AACxC,SAAQC,OAAO,QAAO,UAAU;AAChC,SAAQC,QAAQ,IAAIC,YAAY,QAAO,gBAAgB;AAAC;AAExD,MAAMD,QAAiB,GAAG,MAAM;EAAA;EAC5B,MAAM;IAACE;EAAK,CAAC,GAAGL,KAAK,CAACM,UAAU,CAACJ,OAAO,CAAC;EACzC,MAAMK,WAAW,GAAGP,KAAK,CAACQ,MAAM,CAAC,IAAI,CAAC;EAEtCR,KAAK,CAACS,SAAS,CAAC,MAAM;IAClBC,OAAO,CAACC,GAAG,CAACJ,WAAW,CAACK,OAAO,CAAC;EACpC,CAAC,EAAE,CAACP,KAAK,CAACQ,aAAa,CAACC,QAAQ,CAAC,CAAC;EAElC,IAAIT,KAAK,CAACU,gBAAgB,EAAE,CAACD,QAAQ,IAAIT,KAAK,CAACW,iBAAiB,EAAE,KAAK,IAAI,EAAE;IACzE,oBAAQ,QAAC,YAAY;MAAC,GAAG,EAAET,WAAY;MAAC,QAAQ,EAAEF,KAAK,CAACU,gBAAgB,EAAE,CAACD;IAAS;MAAA;MAAA;MAAA;IAAA,QAAG;EAC3F,CAAC,MAAM;IACH,oBAAQ,QAAC,YAAY;MAAA;MAAA;MAAA;IAAA,QAAG;EAC5B;AACJ,CAAC;AAAC,GAbIX,QAAiB;AAAA,KAAjBA,QAAiB;AAevB,qBAAeF,QAAQ,CAACE,QAAQ,CAAC;AAAC;AAAA;AAAA"},"metadata":{},"sourceType":"module"}